1e8a31
@@ -86,6 +86,12 @@
private void handleAlterTableTransactionalProp(PreAlterTableEvent context) throw
         throw new MetaException("The table must be bucketed and stored using an ACID compliant" +
             " format (such as ORC)");
       }
+
+      if (newTable.getTableType().equals(TableType.EXTERNAL_TABLE.toString())) {
+        throw new MetaException(newTable.getDbName() + "." + newTable.getTableName() +
+            " cannot be declared transactional because it's an external table");
+      }
+
       return;
     }
     Table oldTable = context.getOldTable();
@@ -144,6 +150,11 @@
private void handleCreateTableTransactionalProp(PreCreateTableEvent context) thr
             " format (such as ORC)");
       }
 
+      if (newTable.getTableType().equals(TableType.EXTERNAL_TABLE.toString())) {
+        throw new MetaException(newTable.getDbName() + "." + newTable.getTableName() +
+            " cannot be declared transactional because it's an external table");
+      }
+
       // normalize prop name
       parameters.put(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL, Boolean.TRUE.toString());
       return;
